// Assuming your SQL query result is stored in a variable called sqlResult
const sqlResult = [
    // Your SQL query results here...
];


const transformedData = [
    {
        name: 'cf',
        text: '处罚',
        value: sqlResult
            .filter(item => item.type === '1')
            .map(item => ({
                text: item.day,
                value: item.litigant_count
            })),
        checked: false
    },
    {
        name: 'jc',
        text: '检查',
        value: sqlResult
            .filter(item => item.type === '2')
            .map(item => ({
                text: item.day,
                value: item.litigant_count
            })),
        checked: false
    }
];

// Assign to chart element
chartEle.data.props.dataSource.options = transformedData || [];
